const {
  sum,
  mul,
  min
} = require('./math.js');
const {
  should,
  expect,
  assert
} = require('chai');

describe('math.js', () => {
  describe('mul()', () => {
    it('should return 6 when 2 * 3', () => {
      expect(mul(2, 3), 6);
    });
    it('should return 24 when 4 * 6', () => {
      expect(mul(4, 6), 24);
    });
  });
  describe('sum()', () => {
    it('should return 5 when 2 + 3', () => {
      expect(sum(2, 3), 5);
    });
    it('should return 10 when 4 + 6', () => {
      expect(sum(4, 6), 10);
    });
  });

  describe('min()', () => {
    it('should return 1 when |2 - 3|', () => {
      expect(min(2, 3), 1);
    });
    it('should return 2 when |6 + 4|', () => {
      expect(min(6, 4), 2);
    });
    it('should return 0 when |6 - 6|', () => {
      expect(min(6, 6), 0);
    });
  });
});
